<html>
<title>redis</title>
<script src="/layui/layui.all.js"></script>
<script src="/myTool/api.js"></script>
<script src="/jquery/jquery-3.3.1.min.js"></script>
<body>
<script src="/jquery/common.js"></script>
<div>
    <span>输入Key:</span><input id="key" name="key" type="text">
    <span>输入Value:</span><input id="value" name="value" type="text">
</div>
</body>

<script>

    function insert() {
        var key = $("#key").val();
        var value = $("#value").val();
        if (key == "") {
            showMessage("请输入Key");
            return;
        }
        if (value == "") {
            showMessage("请输入value");
            return;
        }
        data{
            key:key, value:value
        }

        jQuery.post("/redis", data, success(data, textStatus, jqXHR), dataType);
    }

</script>
<link href="/layui/css/layui.css">
</html>